# -*-coding:utf-8-*-
import fractions
import random
import math

intval = 0b010101010
print(intval)
print(abs(-100))
print(5 & 9)
print(5 ^ 9)
print(5 | 9)
print(~9)
print((1 > 0 and 1 == 0))
print((1 > 0 or 1 == 0))
print(10 // 3)
print((fractions.Fraction(1) / fractions.Fraction(3)) + 23)
print(1 < 2 < 3 < 4)
print(bin(89))
print(intval.bit_length())
print(round(3.466, 2))  # 四舍五入,小数部分是.5时需注意,结果取最接近的偶数（特例）
print(math.floor(-2.6))  # 向下舍入为最为接近的整数
print(math.ceil(-2.6))  # 向上舍入为最为接近的整数
print(math.trunc(-2.6))  # 截断后的整数
print(random.randint(0, 10))
a = {1, 3, 2}
b = {3, 4, 5}
print(a | b)
print(sorted(a))
print(int(4.25))